const svc = require('../util/service'),
log = require('../util/log'),
fs = require('fs');

module.exports = (req, res) =>
svc.handlePost(req, res, (reqJSON, resolve) => {
	if (!reqJSON.music) {
		resolve({
			result : -1,
			msg : '确实music'
		})
		return
	}
	fs.unlink(__dirname + '/../../music/' + reqJSON.music, err => {
		if (err) {
			log(err)
			resolve({
				result : -1,
				msg : '系统错误'
			})
			return
		}
		resolve({
			result : 1
		})
	})
})
